from typing import Optional

from pydantic import BaseModel, Field


class SettingData(BaseModel):
    key: str
    value: str
    description: str = None
    input_type: str = None


class SettingDataPut(BaseModel):
    value: str
    description: str = None
    input_type: str = None



class GetIconRequest(BaseModel):
    url: str


class UrlData(BaseModel):
    url: str
    name: str
    sort_order: int = None
    icon: str = Field(default="")
    description: str = None
    group_id: int


class URLUpdate(BaseModel):
    url: str = None
    name: str = None
    sort_order: int = None
    icon: str = Field(default="")
    description: str = None
    group_id: int = None


class GroupData(BaseModel):
    name: str
    sort_order: int = None
